package com.cee.service.Impl;

import com.cee.dao.ExamOneSelectMapper;
import com.cee.dto.ExamDTO;
import com.cee.model.ExamOneSelect;
import com.cee.service.ExamOneSelectService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Slf4j
@Service
@Transactional
public class ExamOneSelectServiceImpl implements ExamOneSelectService {

    @Autowired
    private ExamOneSelectMapper examOneSelectMapper;

    @Override
    public int deleteExamOneSelectById(Integer id) {
        return examOneSelectMapper.deleteById(id);
    }

    @Override
    public int saveExamOneSelect(ExamOneSelect examOneSelect) {
      return examOneSelectMapper.insert(examOneSelect);
    }

    @Override
    public List<ExamOneSelect> getListByExamId(Integer examId) {

        return examOneSelectMapper.getListByExamId(examId);
    }

    @Override
    public void updateExamOneSelect(ExamOneSelect examOneSelect) {
        examOneSelectMapper.updateExamOneSelect(examOneSelect);
    }
}
